import Mock from 'mockjs'

Mock.setup({
  timeout: '200-600' // 模拟延迟
});


Mock.mock('/user/login','post',(options:any)=>{
    const {username,password} = options.body
        if (username === 'admin' && password === '123456') {
            return {
              code: 0,
              message: '登录成功',
              data: {
                token: 'abcdefg123456',
              },
            };
          } else {
            return {
              code: 1,
              message: '用户名或密码错误',
            };
          }  
  
})

Mock.mock('/api/register', 'post', (options: any) => {
    const { username, password } = JSON.parse(options.body);
    if (username && password) {
      return {
        code: 0,
        message: '注册成功',
        data: {
          userId: Mock.Random.guid(),
        },
      };
    } else {
      return {
        code: 1,
        message: '注册失败，请检查输入',
      };
    }
  });

  Mock.mock('/api/userinfo', 'get', {
    code: 0,
    message: '获取用户信息成功',
    data: {
      userId: Mock.Random.guid(),
      username: 'admin',
      email: 'admin@example.com',
      age: 30,
      gender: 'male',
    },
  });

  Mock.mock('/balance', 'get', {
    code: 0,
    message: '获取余额成功',
    data: {
      balance: Mock.Random.float(0, 10000, 2, 2),
    },
  });

  Mock.mock('/api/banner', 'get', (options: any) => {
    return {
      code: 0,
      message: '',
      data: {
        list: [
         {img: 'https://cdn.metacloud.cc/10045/image/7cc3d25895454f6d8c19f09db9acd1d6.png',url:"/Promo"},
         {img: 'https://cdn.metacloud.cc/10045/image/e427161174d64591b111afd8dca9de5c.webp',url:"/profile"},
        ],
      },
    };
  });

  Mock.mock('/api/menuModule', 'get',()=> {
return {
  code:0,
  message: '',
data:{
  list: [
  {name:"Provider",
    uniqueId: "PROVIDER" ,
    ico:"https://cdn.metacloud.cc/10045/image/a7aec4d4921f4b23a523ca620322abec.webp",
    activeIco:"https://cdn.metacloud.cc/10045/image/ac94010ca601489ba72cb86147fca922.webp",
    data:[
      {
        "providerName": "Play’n Go",
        "icon": "https://cdn.metacloud.cc/10045/image/3ee6699626b64dfa89b0888716bd4060.webp",
      
      },
      {
        "providerName": "5G",
        "icon": "https://cdn.metacloud.cc/10045/image/0bed46b3b15648bab78a7e148913e47f.webp",
      },
      {
        "providerName": "Funcygame",
        "icon": "https://cdn.metacloud.cc/10045/image/aa3508e1d89f4baea3515defc43ffaaa.webp",
       
      },
      {
        "providerName": "Sa",
        "icon": "https://cdn.metacloud.cc/10045/image/125dbcece6194bc29ddd0472843923fd.webp",
        
      },
      {
        "providerName": "InBet",
        "providerState": 1,
        "icon": "https://cdn.metacloud.cc/10045/image/7b47affc41a442e0b54ae04346f6b40e.webp",
      },
      {
        "providerName": "Habanero",
        "icon": "https://cdn.metacloud.cc/10045/image/3aecd976672f41ea99f2df32c481f891.webp",
        
      },
      {
        
        "providerName": "9W",
        "icon": "https://cdn.metacloud.cc/10045/image/0d3ab1f966684dc38226262a36c51924.webp",
        
      },
      {
        "providerName": "1X2 Gaming",
      },
      {
        "providerName": "AG",
        
        "icon": "https://cdn.metacloud.cc/10045/image/517a0f34ceb54ee787e31a5f65dfd80d.webp",
        
      },
      {
        "providerName": "Hacksaw",
        "icon": "https://cdn.metacloud.cc/10045/image/1bd773b6214e482495b126123a997d53.webp",
        
      },
      {
        "providerName": "Ezugi",
        "icon": "https://cdn.metacloud.cc/10045/image/6f3c6bb9b3614059942d8b60b9a8b6f8.webp",
        
      },
      {
        "providerName": "Evolution",
        "icon": "https://cdn.metacloud.cc/10045/image/b1866c5aa9214ceead0d94bc887bc42b.webp",
        
      },
      {
        "providerName": "Evoplay",
        "icon": "https://cdn.metacloud.cc/10045/image/61fc31bec98b4011b55bf4e6d8a62040.webp",
        
      },
      {
        "providerName": "Joker",
        "icon": "https://cdn.metacloud.cc/10045/image/24bbaedb67424fecb400cc832c38e148.webp",
        
      }
    ]
  },
  {
    uniqueId: "GAME_LOTTERY",
    name: "Lottery",  
    activeIco: "https://cdn.metacloud.cc/10045/image/56848094d6734298a1429b1b09b9dbc9.webp",
ico: "https://cdn.metacloud.cc/10045/image/a8f33da3e38e4626b3f61803179f7a47.webp",
    data :[
      {
        "gameId": 30613,
        "gameName": "TRX",
        "interfaceCode": "wingoTrx",
        "gameMode": 10,
        "gameDatas": [
          {
            "gameType": 1,
            "roundId": "20241206410481",
            "lastRoundId": "20241206410480",
            "lastResultNum": "6",
            "lastResultHash": "***********************************************************2a46c",
            "lastResultTotalNum": null,
            "endTime": 1733472380181,
            "timestamp": 1733472331923,
            "residueSecond": 48258
          },
          {
            "gameType": 2,
            "roundId": "20241206420161",
            "lastRoundId": "20241206420160",
            "lastResultNum": "8",
            "lastResultHash": "***********************************************************18acf",
            "lastResultTotalNum": null,
            "endTime": 1733472438600,
            "timestamp": 1733472331923,
            "residueSecond": 106677
          },
          {
            "gameType": 3,
            "roundId": "20241206430096",
            "lastRoundId": "20241206430095",
            "lastResultNum": "0",
            "lastResultHash": "***********************************************************d64a0",
            "lastResultTotalNum": null,
            "endTime": 1733472428104,
            "timestamp": 1733472331923,
            "residueSecond": 96181
          },
          {
            "gameType": 4,
            "roundId": "20241206440047",
            "lastRoundId": "20241206440046",
            "lastResultNum": "1",
            "lastResultHash": "***********************************************************0121d",
            "lastResultTotalNum": null,
            "endTime": 1733472574167,
            "timestamp": 1733472331923,
            "residueSecond": 242244
          }
        ],
    
      },
      {
        "gameId": 30614,
        "gameName": "5D",
        "interfaceCode": "fived",
        "gameMode": 10,
        "gameDatas": [
          {
            "gameType": 1,
            "roundId": "20241206310484",
            "lastRoundId": "20241206310483",
            "lastResultNum": "2,4,5,6,4",
            "lastResultHash": null,
            "lastResultTotalNum": 21,
            "endTime": 1733472336979,
            "timestamp": 1733472331923,
            "residueSecond": 5056
          },
          {
            "gameType": 2,
            "roundId": "20241206320161",
            "lastRoundId": "20241206320160",
            "lastResultNum": "4,0,0,2,2",
            "lastResultHash": null,
            "lastResultTotalNum": 8,
            "endTime": 1733472369512,
            "timestamp": 1733472331923,
            "residueSecond": 37589
          },
          {
            "gameType": 3,
            "roundId": "20241206330096",
            "lastRoundId": "20241206330095",
            "lastResultNum": "5,7,5,5,4",
            "lastResultHash": null,
            "lastResultTotalNum": 26,
            "endTime": 1733472458787,
            "timestamp": 1733472331923,
            "residueSecond": 126864
          },
          {
            "gameType": 4,
            "roundId": "20241206340047",
            "lastRoundId": "20241206340046",
            "lastResultNum": "8,8,4,8,9",
            "lastResultHash": null,
            "lastResultTotalNum": 37,
            "endTime": 1733472456952,
            "timestamp": 1733472331923,
            "residueSecond": 125029
          }
        ],
      },
      {
        "gameId": 30615,
        "gameName": "K3",
        "interfaceCode": "fastThree",
        "gameMode": 10,
        "gameDatas": [
          {
            "gameType": 1,
            "roundId": "20241206210484",
            "lastRoundId": "20241206210483",
            "lastResultNum": "2,1,1",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472336880,
            "timestamp": 1733472331923,
            "residueSecond": 4957
          },
          {
            "gameType": 2,
            "roundId": "20241206220161",
            "lastRoundId": "20241206220160",
            "lastResultNum": "3,5,6",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472369211,
            "timestamp": 1733472331923,
            "residueSecond": 37288
          },
          {
            "gameType": 3,
            "roundId": "20241206230096",
            "lastRoundId": "20241206230095",
            "lastResultNum": "4,1,3",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472457987,
            "timestamp": 1733472331923,
            "residueSecond": 126064
          },
          {
            "gameType": 4,
            "roundId": "20241206240047",
            "lastRoundId": "20241206240046",
            "lastResultNum": "3,6,2",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472456663,
            "timestamp": 1733472331923,
            "residueSecond": 124740
          }
        ],
       
      },
      {
        "gameId": 30566,
        "gameName": "Wingo",
        "interfaceCode": "wingo",
        "gameMode": 10,
        "gameDatas": [
          {
            "gameType": 1,
            "roundId": "20241206110484",
            "lastRoundId": "20241206110483",
            "lastResultNum": "5",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472337083,
            "timestamp": 1733472331923,
            "residueSecond": 5160
          },
          {
            "gameType": 2,
            "roundId": "20241206120161",
            "lastRoundId": "20241206120160",
            "lastResultNum": "7",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472371516,
            "timestamp": 1733472331923,
            "residueSecond": 39593
          },
          {
            "gameType": 3,
            "roundId": "20241206130096",
            "lastRoundId": "20241206130095",
            "lastResultNum": "5",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472460292,
            "timestamp": 1733472331923,
            "residueSecond": 128369
          },
          {
            "gameType": 4,
            "roundId": "20241206140047",
            "lastRoundId": "20241206140046",
            "lastResultNum": "7",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472456959,
            "timestamp": 1733472331923,
            "residueSecond": 125036
          }
        ],
        "categoryId": 2,
        "providerId": 11,
        "almsActivityGameModels": {
          "categoryIdSet": [
            2
          ],
          "providerIdSet": [],
          "activityId": 311,
          "activityType": 46,
          "gameId": 30566,
          "attendAlmsActivityGame": true
        },
        "hallStatus": 0,
        "hallOpenWith": "Game"
      },
      {
        "gameId": 30566,
        "gameName": "Wingo",
        "interfaceCode": "wingo",
        "gameMode": 10,
        "gameDatas": [
          {
            "gameType": 1,
            "roundId": "20241206110484",
            "lastRoundId": "20241206110483",
            "lastResultNum": "5",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472337083,
            "timestamp": 1733472331923,
            "residueSecond": 5160
          },
          {
            "gameType": 2,
            "roundId": "20241206120161",
            "lastRoundId": "20241206120160",
            "lastResultNum": "7",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472371516,
            "timestamp": 1733472331923,
            "residueSecond": 39593
          },
          {
            "gameType": 3,
            "roundId": "20241206130096",
            "lastRoundId": "20241206130095",
            "lastResultNum": "5",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472460292,
            "timestamp": 1733472331923,
            "residueSecond": 128369
          },
          {
            "gameType": 4,
            "roundId": "20241206140047",
            "lastRoundId": "20241206140046",
            "lastResultNum": "7",
            "lastResultHash": null,
            "lastResultTotalNum": null,
            "endTime": 1733472456959,
            "timestamp": 1733472331923,
            "residueSecond": 125036
          }
        ],
        "categoryId": 2,
        "providerId": 11,
        "almsActivityGameModels": {
          "categoryIdSet": [
            2
          ],
          "providerIdSet": [],
          "activityId": 311,
          "activityType": 46,
          "gameId": 30566,
          "attendAlmsActivityGame": true
        },
        "hallStatus": 0,
        "hallOpenWith": "Game"
      }
    ]
  },
  {
    uniqueId:"HOT",
    name: "BigWins",  
    activeIco: "https://cdn.metacloud.cc/10045/image/ed625941b641429e8e6b348d3f204c08.webp",
    ico:"https://cdn.metacloud.cc/10045/image/3a8116d0ae114dcfa5f2a45a84ae8b20.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  },
  {
    uniqueId:"HOT",
    name: "BigWins",  
    activeIco: "https://cdn.metacloud.cc/10045/image/56848094d6734298a1429b1b09b9dbc9.webp",
    ico: "https://cdn.metacloud.cc/10045/image/a8f33da3e38e4626b3f61803179f7a47.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  },
  {
    uniqueId:"BigWins",
    name: "BigWins",   
activeIco: "https://cdn.metacloud.cc/10045/image/ed625941b641429e8e6b348d3f204c08.webp",
    ico: "https://cdn.metacloud.cc/10045/image/3a8116d0ae114dcfa5f2a45a84ae8b20.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  },
  {
    uniqueId:"HOT",
    name:"recommd",
    activeIco: "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
    ico: "https://cdn.metacloud.cc/10045/image/a8f33da3e38e4626b3f61803179f7a47.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  },
  {
    uniqueId:"Slot",
    "name": "Slot",
    activeIco: "https://cdn.metacloud.cc/10045/image/8e725f80ee36425b865a0369f62202ae.webp",
    ico:  "https://cdn.metacloud.cc/10045/image/35e723b2bdaa44898e735388758abc14.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  },
  {
    uniqueId:"Slot",
    name: "Slot",
    activeIco: "https://cdn.metacloud.cc/10045/image/8e725f80ee36425b865a0369f62202ae.webp",
    ico:  "https://cdn.metacloud.cc/10045/image/35e723b2bdaa44898e735388758abc14.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  },
  {
    uniqueId:"Slot",
    "name": "Slot",
    activeIco: "https://cdn.metacloud.cc/10045/image/8e725f80ee36425b865a0369f62202ae.webp",
    ico:  "https://cdn.metacloud.cc/10045/image/35e723b2bdaa44898e735388758abc14.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  },
  {
    uniqueId:"Slot",
    "name": "Slot",
    activeIco: "https://cdn.metacloud.cc/10045/image/8e725f80ee36425b865a0369f62202ae.webp",
    ico:  "https://cdn.metacloud.cc/10045/image/35e723b2bdaa44898e735388758abc14.webp",
    data:[
      {
        "name": "5D",
        "icon": "https://cdn.metacloud.cc/game/image/60db9c7ee55e4372b9bcc1fed7f6fb26.webp",
       
      },
      {
        "id": 30337,
        "name": "9W-sport",
        "icon": "https://cdn.metacloud.cc/game/image/9d5da9dd593f43d3bcc30ee85797a04c.webp",
       
      },
      {
        "id": 5684,
        "name": "Goex",
        "icon": null,
      }
    ]
  }
]
}
}
  })